package rowAndMaximumOnes;

public class Solution {
    public int[] rowAndMaximumOnes(int[][] mat) {
        int row = 0;
        int maxCount = 0;
        for (int i = 0; i < mat.length; i++) {
            int count = 0;
            for (int j = 0; j < mat[i].length; j++) {
                if(mat[i][j] == 1) {
                    count++;
                }
            }
            if(count>maxCount) {
                row = i;
                maxCount = count;
            }
        }
        return new int[]{row,maxCount};
    }
}
